import { useModel } from '@umijs/max';
import { Card, Empty } from 'antd';
import ChartBar from './ChartBar';
import ChartRadar from './ChartRadar';
import styles from './index.less';

const Charts = () => {
  const { business_diagnosis } = useModel('Resume.resumeModel');
  return (
    <div className={styles.box}>
      <Card title="数据指标分析">
        {business_diagnosis.length === 0 && (
          <div className={styles.emptyBox}>
            <Empty description="AI智能数据指标" />
          </div>
        )}
        {business_diagnosis.length > 0 && (
          <div className={styles.chartBox}>
            <ChartBar />
            <ChartRadar />
          </div>
        )}
      </Card>
    </div>
  );
};

export default Charts;
